<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>File: README.rdoc [RDoc Documentation]</title>

	<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />

	<script src="./js/jquery.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="./js/thickbox-compressed.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="./js/quicksearch.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="./js/darkfish.js" type="text/javascript"
		charset="utf-8"></script>
</head>

<body class="file">
	<div id="metadata">
		<div id="home-metadata">
			<div id="home-section" class="section">
        <h3 class="section-header">
          <a href="./index.html">Home</a>
          <a href="./index.html#classes">Classes</a>
          <a href="./index.html#methods">Methods</a>
        </h3>
			</div>
		</div>

		<div id="project-metadata">
			
			
			<div id="fileindex-section" class="section project-section">
				<h3 class="section-header">Files</h3>
				<ul>
				
					<li class="file"><a href="./LICENSE.html">LICENSE</a></li>
				
					<li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
				
				</ul>
			</div>
			

			<div id="classindex-section" class="section project-section">
				<h3 class="section-header">Class Index
					<span class="search-toggle"><img src="./images/find.png"
						height="16" width="16" alt="[+]"
						title="show/hide quicksearch" /></span></h3>
				<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
				<fieldset>
					<legend>Quicksearch</legend>
					<input type="text" name="quicksearch" value=""
						class="quicksearch-field" />
				</fieldset>
				</form>

				<ul class="link-list">
				
					<li><a href="./TwitterAlert.html">TwitterAlert</a></li>
				
					<li><a href="./TwitterAlert/Account.html">TwitterAlert::Account</a></li>
				
					<li><a href="./TwitterAlert/Alert.html">TwitterAlert::Alert</a></li>
				
				</ul>
				<div id="no-class-search-results" style="display: none;">No matching classes.</div>
			</div>

			
		</div>
	</div>

	<div id="documentation">
		<h1>twitter_alert</h1>
<p>
The problem that twitter_alert attempts to solve is the programmatic
sending of DMs to all the followers of a given Twitter account. It is a
simple gem that provides one Class and one Module. The class is <a
href="TwitterAlert/Account.html">TwitterAlert::Account</a> and represents
the Twitter account you want to make announcements from. The Module is <a
href="TwitterAlert/Alert.html">TwitterAlert::Alert</a> and should be mixed
in to a class that you want to represent the messages themselves.
</p>
<p>
DISCLAIMER: Please, please, please don&#8217;t use this gem to spam people.
If you do, I hope you get unfollowed or blocked. Seriously. Get permission.
Make sure your followers know that by following your account they&#8217;re
signing up to get DMs from a machine.
</p>
<h2>Installing</h2>
<p>
To install, simple:
</p>
<pre>
  sudo gem install twitter_alert
</pre>
<p>
Note: This gem depends on Grackle for Twitter access.
</p>
<h2>Getting Started</h2>
<p>
The most basic case is pretty simple and would look something like this:
</p>
<pre>
  require 'twitter_alert'

  account = TwitterAlert::Account.new :user_name =&gt; 'benhamill', :password =&gt; 'thisisnotmyrealpassword'

  class Alert
    include TiwtterAlert::Alert
  end

  alert = Alert.new 'Very important message.', DateTime.now

  account.announce alert
</pre>
<p>
In a real program, I&#8217;d expect that your Alert class would actually be
somewhat more complicated and probably inherit from ActiveRecord or
something. The way I intend to use this is to set up a cron job to pull
messages out of the DB that are marked for a given day and send them.
</p>
<h2>Note on Patches/Pull Requests</h2>
<p>
This is the standard Jeweler procedure.
</p>
<ul>
<li><p>
Fork the project.
</p>
</li>
<li><p>
Make your feature addition or bug fix.
</p>
</li>
<li><p>
Add tests for it. This is important so I don&#8217;t break it in a future
version unintentionally.
</p>
</li>
<li><p>
Commit, do not mess with rakefile, version, or history. (if you want to
have your own version, that is fine but bump version in a commit by itself
I can ignore when I pull)
</p>
</li>
<li><p>
Send me a pull request. Bonus points for topic branches.
</p>
</li>
</ul>
<h2>Copyright</h2>
<p>
Copyright &#169; 2009 Ben Hamill. See <a href="LICENSE.html">LICENSE</a>
for details.
</p>

	</div>

	<div id="validator-badges">
		<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
		<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
			Rdoc Generator</a> 1.1.6</small>.</p>
	</div>
</body>
</html>

